import maya.cmds as cmds;
import pymel.core as pm;

cmds.SelectAll();
cmds.Delete();

pulleyRadius = 25;
ropeDiameter = 3;
lipHeight = 1;
screwDiameter = 7.9375;#5/16 in bolt to mm
wallthickness = 5;
washerThickness = 1.5875;#5/16 in bolt washer = 1/16 in thickness to mm

pulleyheight = ropeDiameter + 2*lipHeight;

enclosureDepth = 1.5*pulleyRadius + 2*ropeDiameter;
enclosureHeight = pulleyRadius + 1.5*screwDiameter;
enclosureWidth = 2*pulleyheight+2*wallthickness + 4*washerThickness + 0.1;#0.1 fudge factor

pulleyClearance = 2;#distance between pulley and bottom of cnclosure

guide = cmds.polyTorus( sx=20, sy=20, r=pulleyRadius, sr=(ropeDiameter/2.0) )
cmds.select(guide);
guide2 = pm.duplicate(guide,un=True);

pm.move(-5,0,0,guide2);